package com.peace.hospital.opdept.mapper.outpatientdept;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.peace.hospital.entity.outpatientdept.Allcharge;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 总收费表 Mapper 接口
 * </p>
 *
 * @author 谢晓峰
 * @since 2019-11-11
 */
@Mapper
public interface AllchargeMapper extends BaseMapper<Allcharge> {

    @Insert("insert into outpatientDepartment.allcharge(pid,allprice,alldate,allsettlement) values(#{pid},#{allprice},now(),#{allsettlement})")
    int addAllchargeOne(Allcharge allcharge);

    @Update("udate outpatientDepartment.allcharge set allsettlement = 0 where pid = #{pid}")
    String peopleSettlementById(Integer pid);
}
